const fs = require('fs')

exports.getInfo = async (ctx, next) => {
    let query = ctx.request.query
    if(query['c'] === 'index' && query['a'] === 'allConfig'){
        let file="localApis/allConfig.json"
        let result=JSON.parse(fs.readFileSync( file))
        ctx.body = result
    }
    if(query['c'] === 'user' && query['a'] === 'mainData'){
        let file = "localApis/mainData.json"
        let result = JSON.parse(fs.readFileSync(file))
        ctx.body = result
    }
    if(query['c'] === 'user' && query['a'] === 'equipList'){
        let file = "localApis/equipList.json"
        let result = JSON.parse(fs.readFileSync(file))
        ctx.body = result
    }
    if(query['c'] === 'act' && query['a'] === 'dailyRank'){
        let file = "localApis/dailyRank.json"
        let result = JSON.parse(fs.readFileSync(file))
        ctx.body = result
    }
    if(query['c'] === 'user' && query['a'] === 'getActPayInfo'){
        let file = "localApis/getActPayInfo.json"
        let result = JSON.parse(fs.readFileSync(file))
        ctx.body = result
    }
    if(query['c'] === 'user' && query['a'] === 'missionStart'){
        let file = "localApis/missionStart.json"
        let result = JSON.parse(fs.readFileSync(file))
        ctx.body = result
    }
    if(query['c'] === 'user' && query['a'] === 'missionClip'){
        let file = "localApis/missionClip.json"
        let result = JSON.parse(fs.readFileSync(file))
        ctx.body = result
    }
}

function allConfig(){

}